package com.cloudcc.mobile.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.cloudcc.mobile.R;

public class RelevantDialog {
	private Context context;
	private Dialog dialog;
	public RelevantDialog(Context context){
		this.context=context;
	}
	public Dialog creatLeiXingDialog(){
		dialog = new Dialog(context, R.style.DialogStyle);
		dialog.setContentView(R.layout.chooseleixing);
		dialog.setCancelable(false);
		dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
		return dialog;
	}
	public void onleixingClickListener(OnClickListener listener){
		if(listener!=null){
			ImageView view=(ImageView)dialog.findViewById(R.id.choose_leixing);
			if(view!=null){
				view.setOnClickListener(listener);
			}
		}
	}
	public Dialog createHuDongDialog(){
		dialog=new Dialog(context,R.style.DialogStyle);
		dialog.setContentView(R.layout.choosehuadong);
		dialog.setCancelable(false);
		dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
		return dialog;
	}
	public void onhuadongClicListner(OnClickListener listener){
		if(listener!=null){
			ImageView view=(ImageView)dialog.findViewById(R.id.choose_huadong);
			if(view!=null){
				view.setOnClickListener(listener);
			}
		}
	}
	
}
